package com.cr.crandroid.utils;

import java.util.Date;

public class DateUtils {


    public static int dateDiff(Date starDate, Date endDate) {
        int day = 0;
        try {
            long starDateTime = starDate.getTime();
            long endDateTime = endDate.getTime();
            day = (int) ((starDateTime - endDateTime) / (24 * 60 * 60 * 1000));
            day+=1;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return day;
    }

}
